<template>
  <div>
    <el-table :data="[{ id: 1, tmName: '111', logoUrl: 'xxx' }]" border>
      <el-table-column
        label="序号"
        type="index"
        align="center"
        width="60"
      ></el-table-column>
      <el-table-column label="品牌名称" prop="tmName"></el-table-column>
      <el-table-column label="品牌LogoUrl">
        <template v-slot="{ row }">
          <img :src="row.logoUrl" />
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template v-slot="{ row }">
          <el-button type="primary" link>编辑</el-button>
          <el-button type="primary" link>删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      v-model:current-page="currentPage"
      v-model:page-size="pageSize"
      :total="10"
      :page-sizes="[10, 20, 30, 40]"
      layout="prev, pager, next, jumper, ->, sizes, total"
    ></el-pagination>
  </div>
</template>

<script lang="ts">
export default {
  name: "XTable",
};
</script>

<script lang="ts" setup>
import { ref } from "vue";

const currentPage = ref(1);
const pageSize = ref(10);
</script>

<style scoped></style>
